package xyz.lwm.lazycat.aop.matcher;

import xyz.lwm.lazycat.aop.info.MethodInfo;
import xyz.lwm.lazycat.utility.matcher.Matcher;

class MethodAnnotationMatcher implements Matcher<MethodInfo> {

    private final Matcher<String[]> matcher;

    public MethodAnnotationMatcher(Matcher<String[]> matcher) {
        this.matcher = matcher;
    }

    @Override
    public boolean matches(MethodInfo target) {
        return matcher.matches(target.getAnnotationNames());
    }

}
